<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>findIndex()</title>
</head>
<body>
  <script>
    //寻找满足条件元素的索引
    let arr = [10,20,304,50];
    let targetIndex = arr.findIndex((value,index)=> value > 100);
    console.log(targetIndex);
  </script>
</body>
</html>